<div id="pnr_search_div"></div>
<script>
    Ext.onReady(function(){
        var PNR = new Ext.form.TextField({
            fieldLabel: 'PNR',
            allowBlank: false,
            name: 'pnr',
            anchor: '90%'
        });
        var searchButton = new Ext.Button({
            text: '搜 索',
            handler: searchByOrderID
        })
        var formPanel = new Ext.form.FormPanel({
            //baseCls: 'x-plain',
            labelWidth: 75,
            width: '500',
            labelAlign: 'right',
            frame: true,
            items: [{
                    layout: 'column',
                    border: false,
                    items: [{
                            columnWidth: .6,
                            layout: 'form',
                            border: false,
                            items: [PNR]
                        },{
                            columnWidth: .2,
                            layout: 'form',
                            border: false,
                            items: [searchButton]
                        }]
                }]
        });
        formPanel.render('pnr_search_div');
        function searchByOrderID(){
            if (formPanel.form.isValid()) {
                webOrderDS.removeAll();
                webOrderDS.baseParams.pnr = PNR.getValue();
                webOrderDS.load({
                    params: {
                        start: 0,
                        limit: 10
                    }
                });
                webOrderDS.baseParams.pnr=null;
            }
        }
    });
</script>